package com.guodi.model.feign.fallback;


import com.guodi.core.tool.api.R;
import com.guodi.model.feign.ISysClientFeign;
import com.guodi.system.vo.OrgVO;
import feign.hystrix.FallbackFactory;
import lombok.extern.slf4j.Slf4j;
import org.springframework.stereotype.Service;

import java.util.List;


@Service
@Slf4j
public class SysFallback implements FallbackFactory<ISysClientFeign> {


    @Override
    public ISysClientFeign create(Throwable throwable) {
        return new ISysClientFeign() {
            @Override
            public R<List<OrgVO>> deptList(String category, Boolean treeFormat) {
                log.info("getAllTasks异常：" + throwable.toString());
                return null;
            }
        };
    }
}
